﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if
	dim rs,sql,rst,sqlt,j,i
	dim fleg,num
    		fleg = Request("fleg")    
    		If fleg = "" Then fleg = 0
   		If Not IsNumeric(fleg) Then fleg = 0
    		fleg = CLng(fleg)
    		If fleg < 0 Then fleg = 0

                num=conn.execute("select max(id) as id from qingtian_class")("id")+1
			set rs=server.CreateObject("adodb.recordset")
			sql="select [name],[urls],[img],[content],[pid],[time],[Ext],[fleg],[br],[addtime],[path],[pathcount],[VIP],[VIPHy],[vipgm],[zf],[del],[yinz] from qingtian_class where [id]="&fleg&" or [fleg]="&fleg&" order by [id] asc"
			rs.open sql,conn,1,1
			if not (rs.bof and rs.eof) then
                        For i=1 to rs.RecordCount
		        If Rs.Eof Then
			      exit For
		        End If
                        
Set Rst = Server.CreateObject("Adodb.Recordset")
			Sqlt = "select [name],[urls],[img],[content],[pid],[time],[Ext],[fleg],[br],[addtime],[path],[pathcount],[VIP],[VIPHy],[vipgm],[zf],[del],[yinz] from qingtian_class"
			Rst.Open Sqlt,conn,1,3
	                rst.addnew
                        for j=0 to 17                        
                        if j=0 then
                        rst(j)=rs(j)&"[克隆]"
                        elseif j=7 and i<>1 then
                        rst(j)=num
                        else
                        rst(j)=rs(j)
                        end if
                        next
	                rst.update
			Rst.close			
		        set rst=nothing
			Rs.MoveNext
			next
			end if
			Rs.close
			set rs=nothing


%>
	<card title="克隆栏目"><p align="left">
	克隆栏目成功！<br/>
<a href='lclass.asp?page=<%=page%>&amp;fleg=<%=fleg%>&amp;sid=<%=sid%>'>返回栏目管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function


%>
